package com.xpalive.utils;

import com.xpalive.base.BaseEdit;
import com.xpalive.base.BaseEntity;
import com.xpalive.attach.aspect.AttachResult;

public class XCommonUtils {

    public static Long getId(BaseEntity baseEntity) {
        return baseEntity.getId();
    }

    public static Long getId(BaseEdit baseEdit) {
        return baseEdit.getId();
    }

    public static Long getId(AttachResult baseEdit) {
        return baseEdit.getId();
    }

    public static void cleanId(BaseEdit baseEdit) {
        baseEdit.setId(null);
        baseEdit.setVersion(0);
    }
}
